LASAFT-Net-v2 lightΒΆ
LASAFT-Net-v2 Light version for MDX Challenge
!git clone https://github.com/ws-choi/LASAFT-Net-v2 --quiet
%cd LASAFT-Net-v2
/home/wschoi/LASAFT-Net-v2/book/quickstart/LASAFT-Net-v2
# preliminaries: install python3-dev
!pip install hydra-core==1.1.0.rc1 pytorch-lightning>=1.4.1 rich wandb
import soundfile as sf
from IPython.display import display, Audio
mixture, _ = sf.read('data/test/sample/mixture.wav')
display(Audio(mixture.T, rate=44100))
from load_pretrained import get_mdx_light_v2_699
model = get_mdx_light_v2_699()
checkpoint conf/pretrained/v2_light/epoch=669.ckpt is loaded:
result = model.separate_tracks(mixture, ['vocals', 'drums', 'bass', 'other'], overlap_ratio=0.5, batch_size=4)
print('separated vocals:')
display(Audio(result['vocals'].T, rate=44100))
print('separated drums:')
display(Audio(result['drums'].T, rate=44100))
print('separated bass:')
display(Audio(result['bass'].T, rate=44100))
print('separated other:')
display(Audio(result['other'].T, rate=44100))
/home/wschoi/exit/envs/tutorial-environment/lib/python3.9/site-packages/torch/functional.py:471: UserWarning: stft will soon require the return_complex parameter be given for real inputs, and will further require that return_complex=True in a future PyTorch release. (Triggered internally at ../aten/src/ATen/native/SpectralOps.cpp:664.)
return _VF.stft(input, n_fft, hop_length, win_length, window, # type: ignore[attr-defined]
/home/wschoi/exit/envs/tutorial-environment/lib/python3.9/site-packages/torch/functional.py:545: UserWarning: istft will require a complex-valued input tensor in a future PyTorch release. Matching the output from stft with return_complex=True. (Triggered internally at ../aten/src/ATen/native/SpectralOps.cpp:817.)
return _VF.istft(input, n_fft, hop_length, win_length, window, center, # type: ignore[attr-defined]
separated vocals:
separated drums:
separated bass:
separated other:
%cd ..
%rm -rf LASAFT-Net-v2
/home/wschoi/LASAFT-Net-v2/book/quickstart